package com.jlf.tool.validation.constraint;


import com.jlf.tool.validation.NotBlankOnConditional;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;

/**
 * 有条件的非空判断处理
 *
 * @author wujr
 * 2022/6/29
 * @version 1.0
 * 【变更历史】
 * [wujr 2022/6/29 1.0 新增]
 */
public class NotBlankConstraintValidator implements ConstraintValidator<NotBlankOnConditional, String> {
    private NotBlankOnConditional rule;

    @Override
    public void initialize(NotBlankOnConditional annotation) {
        this.rule = annotation;
    }

    @Override
    public boolean isValid(String value, ConstraintValidatorContext context) {
        return true;
    }
}
